home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / kill-the-dragons.swf / scripts / DefineSprite_889 / frame_16 / DoAction.as
Encoding:
Text File  |  2011-12-21  |  324 b   |  14 lines

  1. oppThrow();
  2. oppX = this._x;
  3. oppY = this._y;
  4. differenceX = oppXnew - oppX;
  5. differenceY = oppYnew - oppY;
  6. if(Math.abs(differenceX) < 1 && Math.abs(differenceY) < 1)
  7. {
  8.    gotoAndStop("start");
  9.    play();
  10.    _parent.oppMove--;
  11. }
  12. this._x += differenceX / _parent.oppSpeed;
  13. this._y += differenceY / _parent.oppSpeed;
  14.